package com.ojoin.ojoin.eb_spider.domain;

import java.io.Serializable;

public class CaiNaioInventory implements Serializable{
	
	private String username ;
	
	private String password ;
	
	private String loginType;
	
	/**
	 * 菜鸟中统计的在途货物数量
	 */
	private int cainiaoNumOnTheWay ;
	
	/**
	 * 菜鸟中统计的货物数量
	 */
	private int cainiaoNum ;
	
	
	/**
	 * 单价
	 */
	private Float unitPrice = 260f;
	
	/**
	 * 折扣比例
	 */
	private Float ratio = 0.8F ;
	
	/**
	 * 折扣比例
	 */
	private Float ratioOnTheWay = 0.7F ;
	
	
	/**
	 * 异常信息
	 */
	private Exception exception ;
	
	public int getCainiaoNum() {
		return cainiaoNum;
	}

	public void setCainiaoNum(int cainiaoNum) {
		this.cainiaoNum = cainiaoNum;
	}

	public Float getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Float unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Float getRatio() {
		return ratio;
	}

	public void setRatio(Float ratio) {
		this.ratio = ratio;
	}
	
	/**
	 * 获取库存总金额
	 * @return
	 */
	public Float getInventoryMoneyIn(){
		return cainiaoNum*unitPrice*ratio*100;
	}

	public Float getInventoryMoneyOnTheWay(){
		return cainiaoNumOnTheWay*unitPrice*ratioOnTheWay*100;
	}
	
	public Float getInventoryMoney(){
		return getInventoryMoneyIn()+getInventoryMoneyOnTheWay();
	}
	
	/**
	 * 获取库存总金额明细
	 * @return
	 */
	public String getInventoryMoneyInDetail(){
		return "已入库:["+cainiaoNum+"]"+"*"+ unitPrice+"*"+ratio+"*"+100;
	}

	public String getInventoryMoneyOnTheWayDetail(){
		return "在途:["+cainiaoNumOnTheWay+"]"+"*"+unitPrice+"*"+ratioOnTheWay+"*"+100;
	}
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getLoginType() {
		return loginType;
	}

	public void setLoginType(String loginType) {
		this.loginType = loginType;
	}

	public Exception getException() {
		return exception;
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}

	public int getCainiaoNumOnTheWay() {
		return cainiaoNumOnTheWay;
	}

	public void setCainiaoNumOnTheWay(int cainiaoNumOnTheWay) {
		this.cainiaoNumOnTheWay = cainiaoNumOnTheWay;
	}

	public Float getRatioOnTheWay() {
		return ratioOnTheWay;
	}

	public void setRatioOnTheWay(Float ratioOnTheWay) {
		this.ratioOnTheWay = ratioOnTheWay;
	}

}
